#include <QQuickWindow>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "dirsearch.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    //QGuiApplication app(argc, argv);

    //qmlRegisterType<exportxlsx>("et.exportxlsx",1,0,"Exportxlsx");
    qmlRegisterType<dirsearch>("et.dirsearch",1,0,"Dirsearch");

    QQmlApplicationEngine engine;
    const QUrl url(QStringLiteral("qrc:/MainChoice.qml"));//main
    QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                     &app, [url](QObject *obj, const QUrl &objUrl) {
        if (!obj && url == objUrl)
            QCoreApplication::exit(-1);
    }, Qt::QueuedConnection);
    engine.load(url);

    return app.exec();
}
